<?php
/**
 * 商品管理
 *
 *
 *
 *
 
 */
defined('InShopNC') or exit('Access Invalid!');

class feverModel extends Model{
    public function __construct(){
        parent::__construct('fever');
    }
    
    public function getFeverList($con){
        
        $sql="select  fever_goodsid,fever_goodsname,fever_goodsprice,fever_actiontype,count(fever_id) as fever_count from lxs_fever where $con group by ( fever_actiontype) order by fever_count";
        return Model()->query($sql);
        //return $this->where($condition)->limit(false)->group('key_word')->select();
    }
    
    public function getOneFever($conditon){
        return $this->where($conditon)->find();
    }
    public function getFeverDtlist($conditon){
        return $this->where($conditon)->select();
    }
    
    public function saveFever($data){
        return $this->insert($data);
    }
    
    public function editFever($condition,$update){
       return  $this->where($condition)->update($update);
    }
    
    public function delFever($condition){
        return $this->where($condition)->delete();
    }
    
    
}